Frontend Forever App
We have a mobile app for you to download and use. And you can unlock many features in the app.
Get it now
Intall Later
Run
HTML
CSS
Javascript
Output
body { margin: 0; height: 100vh; width: 100vw; overflow: hidden; } .main { perspective: 1100px; } .wrap { height: 100vh; width: 100vw; position: relative; -webkit-transform-style: preserve-3d; transform-style: preserve-3d; transition: linear 0.1s; } .bg { -webkit-transform: translateZ(-100px); transform: translateZ(-100px); height: 130vh; width: 130vw; margin: -12vh -15vw; background-image: url(https://audreydcunningham.files.wordpress.com/2015/08/739405-avengers-wallpaper.jpg); background-size: cover; background-position: bottom; } .characterscls.bg2 { position: fixed; top: 0; width: 115%; margin: 0 -10% 2% -10%; height: 115%; transform: translateZ(400px); background-image: url(http://fedorovaoksana.com/i/tv-oskolki.png); background-size: 100%; background-position: left; background-repeat: repeat; -webkit-filter: blur(2px); } .characterscls.bg2.bg3 { transform: translateZ(150px); -webkit-filter: blur(0.5px); background-position: right; } .characterscls { -webkit-transform: translateZ(100px); transform: translateZ(100px); float: left; margin: 50px; color: #fff; font: 3em arial; width: 10%; mix-blend-mode: unset; margin-left: 0; margin-top: -30px; -webkit-filter: contrast(89%) brightness(72%); } img { width: 100%; } .characterscls img { width: 200%; position: fixed; bottom: 0; margin: auto; } .thor img { transform: rotateY(180deg); } .hulk img { width: 250%; } .hulk { transform: translateX(0px) translateY(-50px) translateZ(-85px); } .captainamerica { transform: translateZ(35px); } .hawkeye { transform: scale(0.7) translateZ(50px); } .widow { transform: scale(0.9) translateZ(-60px); margin-top: -10px; } .ironman { transform: scale(0.9) translateZ(100px); }
$(document).ready(function(){ $(".wrap").css("width", $(window).width()); }) $(document).on("mousemove", function(event){ var window_height = $(this).height(); var window_width = $(this).width(); var mouseXpos = event.clientX; var mouseYpos = event.clientY; var YrotateDeg = (window_width/2 - mouseXpos) * -0.02; var XrotateDeg = (window_height/2 - mouseYpos) * -0.02; $(".wrap").css("transform", "rotateX("+XrotateDeg+"deg) rotateY("+YrotateDeg+"deg)"); });